﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Text;

namespace IDAdmin
{
    public class AppManager
    {
        public static string IDLink
        {
            get
            {
                return System.Configuration.ConfigurationSettings.AppSettings["IdLink"];
            }
        }

        /// <summary>
        /// ID của game
        /// </summary>
        public static string GameID
        {
            get
            {
                try
                {
                    return Lib.Utils.Converter.ToString(HttpContext.Current.Session["IDAdmin_GameID"]);
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                HttpContext.Current.Session["IDAdmin_GameID"] = value;
            }
        }

        /// <summary>
        /// Tên game
        /// </summary>
        public static string GameName
        {
            get
            {
                try
                {
                    return Lib.Utils.Converter.ToString(HttpContext.Current.Session["IDAdmin_GameName"]);
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                HttpContext.Current.Session["IDAdmin_GameName"] = value;
            }
        }
    }
}
